<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: tianhao
 * @LastEditTime: 2022-01-10 16:37:48
-->
<template>
  <!--1. 容器 -->
  <div ref="left1_container" id="container" style="height: 95%"></div>
</template>

<script>
import {Line} from '@antv/g2plot';

import moment from "moment"
export default {
  data (){
    return{
       dataArr:[{
    Date: '11.20',
    people: 24,
  },
  {
    Date: '11.25',
    people: 49,
  },
  {
    Date: '11.30',
    people: 29,
  },
  {
    Date: '12.5',
    people: 124,
  },
  {
    Date: '12.10',
    people: 74,
  }]
     }
  },
  created(){

  },
mounted(){
this.initChart()
},
methods:{
 
initChart(){
  const line = new Line(this.$refs.left1_container,{
    data:this.dataArr,
    padding: 'auto',
      xField: 'Date',
      yField: 'people',
      xAxis: {
        // type: 'timeCat',
        tickCount: 5,
      },
      smooth: true,
    });

    line.render();
}
}
}
</script>

<style scoped>

</style>